﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MISAPP.MISInterface;

public partial class View_IMG_IMG001 : ViewMatrix
{
    protected void Page_Load(object sender, EventArgs e)
    {
        limit();
        
        lbl_result.Text = string.Empty;
        Title = "匯損與避險查詢";
        serviceName = "MISAPP.Classify.Service.Service_IMG001";
        if (!IsPostBack)
        {
            txtYM1.Text = DateTime.Now.Year.ToString();
            FillCriteria("GetCriteriaData", "SetData");
        }
    }

    protected void btn_ExecuteClick(object sender, EventArgs e)
    {
        //MISAPP.Classify.Service.Service_IMG001 img = new
        //    MISAPP.Classify.Service.Service_IMG001();
        //img.test();

        string ym = string.Format("{0}01", txtYM1.Text);
        if (!Utility.IsDateYM(ym))
        {
            lbl_result.Text = "請輸入YYYY";
            return;
        }
        execute();
        Server.Transfer("IMG001_1.aspx");
    }

    protected void execute()
    {        
        List<iSelectList> CriteriaList = GetSelectCLB();
        Session["Criteria"] = CriteriaList;
        Session["twym"] = txtYM1.Text;
        
    }
}
